import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    // name: 'layout',
    component: () => import('@/layout'),
    children: [
      {
        path: '',
        name: 'home',
        component: () => import('@/views')
      },
      {
        path: '/about',
        name: 'about',
        component: () => import('@/views/about.vue')
      },
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login.vue')
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
